---
layout: "default"
title: "Operator: -="
description: "Swift documentation for the '-=' operator."
root: "/v3.1"
---

<code class="language-swift"> operator -= {
    associativity right
    precedence 
    assignment
}</code>

<h3>Declarations</h3>

<div class="declaration" id="func-mnseq_-inout-double-rhs_-double">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-double-rhs_-double">func -=(<wbr>_:<wbr> inout Double, rhs: Double)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-double-rhs_-double"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout Double, rhs: Double)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-float-rhs_-float">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-float-rhs_-float">func -=(<wbr>_:<wbr> inout Float, rhs: Float)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-float-rhs_-float"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout Float, rhs: Float)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-float80-rhs_-float80">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-float80-rhs_-float80">func -=(<wbr>_:<wbr> inout Float80, rhs: Float80)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-float80-rhs_-float80"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout Float80, rhs: Float80)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-int-rhs_-int">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-int-rhs_-int">func -=(<wbr>_:<wbr> inout Int, rhs: Int)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-int-rhs_-int"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout Int, rhs: Int)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-int8-rhs_-int8">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-int8-rhs_-int8">func -=(<wbr>_:<wbr> inout Int8, rhs: Int8)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-int8-rhs_-int8"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout Int8, rhs: Int8)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-int16-rhs_-int16">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-int16-rhs_-int16">func -=(<wbr>_:<wbr> inout Int16, rhs: Int16)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-int16-rhs_-int16"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout Int16, rhs: Int16)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-int32-rhs_-int32">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-int32-rhs_-int32">func -=(<wbr>_:<wbr> inout Int32, rhs: Int32)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-int32-rhs_-int32"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout Int32, rhs: Int32)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-int64-rhs_-int64">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-int64-rhs_-int64">func -=(<wbr>_:<wbr> inout Int64, rhs: Int64)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-int64-rhs_-int64"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout Int64, rhs: Int64)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-uint-rhs_-uint">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-uint-rhs_-uint">func -=(<wbr>_:<wbr> inout UInt, rhs: UInt)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-uint-rhs_-uint"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout UInt, rhs: UInt)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-uint8-rhs_-uint8">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-uint8-rhs_-uint8">func -=(<wbr>_:<wbr> inout UInt8, rhs: UInt8)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-uint8-rhs_-uint8"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout UInt8, rhs: UInt8)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-uint16-rhs_-uint16">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-uint16-rhs_-uint16">func -=(<wbr>_:<wbr> inout UInt16, rhs: UInt16)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-uint16-rhs_-uint16"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout UInt16, rhs: UInt16)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-uint32-rhs_-uint32">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-uint32-rhs_-uint32">func -=(<wbr>_:<wbr> inout UInt32, rhs: UInt32)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-uint32-rhs_-uint32"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout UInt32, rhs: UInt32)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq_-inout-uint64-rhs_-uint64">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq_-inout-uint64-rhs_-uint64">func -=(<wbr>_:<wbr> inout UInt64, rhs: UInt64)</a>
        
<div class="comment collapse" id="comment-func-mnseq_-inout-uint64-rhs_-uint64"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=(lhs: inout UInt64, rhs: UInt64)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq-t-where-t_-integerarithmetic_-inout-t-rhs_-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq-t-where-t_-integerarithmetic_-inout-t-rhs_-t">func <wbr>-= &lt;T where T : _IntegerArithmetic&gt;(<wbr>_:<wbr> inout T, rhs: T)</a>
        
<div class="comment collapse" id="comment-func-mnseq-t-where-t_-integerarithmetic_-inout-t-rhs_-t"><div class="p">
    <p>Subtracts <code>lhs</code> and <code>rhs</code> and stores the result in <code>lhs</code>, trapping in
case of arithmetic overflow (except in -Ounchecked builds).</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func -=&lt;T where T : _IntegerArithmetic&gt;(lhs: inout T, rhs: T)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq-t-where-t_-arithmetic_-inout-t-rhs_-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq-t-where-t_-arithmetic_-inout-t-rhs_-t">func <wbr>-= &lt;T where T : Arithmetic&gt;(<wbr>_:<wbr> inout T, rhs: T)</a>
        
<div class="comment collapse" id="comment-func-mnseq-t-where-t_-arithmetic_-inout-t-rhs_-t"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=&lt;T where T : Arithmetic&gt;(lhs: inout T, rhs: T)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq-t-where-t_-floatingpoint_-inout-t-rhs_-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq-t-where-t_-floatingpoint_-inout-t-rhs_-t">func <wbr>-= &lt;T where T : FloatingPoint&gt;(<wbr>_:<wbr> inout T, rhs: T)</a>
        
<div class="comment collapse" id="comment-func-mnseq-t-where-t_-floatingpoint_-inout-t-rhs_-t"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=&lt;T where T : FloatingPoint&gt;(lhs: inout T, rhs: T)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq-t-where-t_-signedinteger_-inout-t-rhs_-t-stride">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq-t-where-t_-signedinteger_-inout-t-rhs_-t-stride">func <wbr>-= &lt;T where T : SignedInteger&gt;(<wbr>_:<wbr> inout T, rhs: T.Stride)</a>
        
<div class="comment collapse" id="comment-func-mnseq-t-where-t_-signedinteger_-inout-t-rhs_-t-stride"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=&lt;T where T : SignedInteger&gt;(lhs: inout T, rhs: T.Stride)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq-t-where-t_-strideable_-inout-t-rhs_-t-stride">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq-t-where-t_-strideable_-inout-t-rhs_-t-stride">func <wbr>-= &lt;T where T : Strideable&gt;(<wbr>_:<wbr> inout T, rhs: T.Stride)</a>
        
<div class="comment collapse" id="comment-func-mnseq-t-where-t_-strideable_-inout-t-rhs_-t-stride"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=&lt;T where T : Strideable&gt;(lhs: inout T, rhs: T.Stride)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-mnseq-t-where-t_-unsignedinteger_-inout-t-rhs_-t-disallowmixedsignarithmetic">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-mnseq-t-where-t_-unsignedinteger_-inout-t-rhs_-t-disallowmixedsignarithmetic">func <wbr>-= &lt;T where T : UnsignedInteger&gt;(<wbr>_:<wbr> inout T, rhs: T._DisallowMixedSignArithmetic)</a>
        
<div class="comment collapse" id="comment-func-mnseq-t-where-t_-unsignedinteger_-inout-t-rhs_-t-disallowmixedsignarithmetic"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func -=&lt;T where T : UnsignedInteger&gt;(lhs: inout T, rhs: T._DisallowMixedSignArithmetic)</code>
    
    
</div></div>
</div>
